//////////////////////////////////////////////////////////////////////////
/// Copyright (c) 2011, Sidorenko 'PC' Alexander                       ///
/// mailto: sidorenko /*dot*/ alexander (at) gmail [dot] com           ///
/// This file is a part of the Radiating Gas Dynamics project          ///
//////////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "PlotHelper.h"
#include "ColorBar.h"

#include "DrawScales.h"

void drawPlot(CDC& dc, CRect& dst, const CColorBar& clr,
			  gdScalar minX, gdScalar maxX, gdScalar minY, gdScalar maxY)
{
	//dc.SetBkMode(TRANSPARENT);
	//dc.SetTextColor(RGB(255, 255, 255));

	CRect tmp1 = dst;
	//dst.left += SECTION_WIDTH * 2;
	dst.bottom -= SECTION_HEIGHT;

	const float COLORBAR_SIZE = 100;
	const float LABELS_WIDTH = 50;

	dst.top += SECTION_HEIGHT;
	dst.right -= COLORBAR_SIZE + LABELS_WIDTH;

	//DrawScales(&dc, dst, true, true, (float)minX, (float)maxX, 15);
	//DrawScales(&dc, dst, false, false, (float)minY, (float)maxY, 15);

	CRect tmp2 = dst;
	tmp2.left = dst.right + SECTION_WIDTH / 4;
	tmp2.right = tmp1.right - SECTION_WIDTH - LABELS_WIDTH;
	clr.DrawColorBar(&dc, tmp2, false);
	DrawScales(&dc, tmp2, false, true, minY, maxY, 15);
}